export let register_success = {
  namespaced: true,
  state: {
    register_success_data: {},
  },
  actions: {
    getRegisterData(store, data = {}) {
      let url = "/register/cellphone?phone=" + data.phone + "&captcha=" + data.captcha + "&password=" + data.password + "&nickname=" + data.nickname + "&ctcode=" + data.ctcode;

      return new Promise((resolve, reject) => {
        axios.get(url).then(({
          data
        }) => {
          store.commit("setRegisterData", data);
          resolve(data)
        }).catch(error => {
          reject(false)
        });
      })

    },
  },
  mutations: {
    setRegisterData(state, data) {
      state.register_success_data = data;
    },
  }
}
